﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Input;
using Caliburn.Micro;
using MCPlatform.Shared.Contracts;
using MCPlatform.Shared.Enums;
using MCPlatform.Shared.Enums.Modes;
using MCPlatform.UI.Contracts;

namespace MCPlatform.UI.Components
{
    public class ViewModelBase : Screen
    {
        public IWindowManager WindowManager => IoC.Get<IWindowManager>();

        public IEventAggregator EventAggregator => IoC.Get<IEventAggregator>();


        public ILogger Logger => IoC.Get<ILogger>();

        public IThemeManager ThemeManager => IoC.Get<IThemeManager>();

        public static string? User { get; set; }

        public static LanguageEnum Culture { get; set; }

        public static OperationMode OperationMode { get; set; }


        public static string? ProductionType { get; set; }


        public static double VeloctyRate { get; set; }


        public static ProductionMode ProductionMode { get; set; }

         public static AutomaticSubMode AutomaticSubMode 
         {
            get => _automaticSubMode;
            set
            {          
                _automaticSubMode = value;
                AutomaticSubModeChanged?.Invoke(value);
            }
         }
        private static AutomaticSubMode _automaticSubMode;



        protected static event Action<AutomaticSubMode>? AutomaticSubModeChanged;

    }
}
